Skip to content

Fix ignored module failures incorrectly failing the pipeline - #2327

Merged
thomhurst merged 2 commits into
mainfrom
fix/ignored-failure-status
Feb 7, 2026
Merged

thomhurst merged 2 commits into
mainfrom
fix/ignored-failure-status

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • Modules configured with IgnoreFailuresCondition no longer cause the pipeline to fail — the failure is properly ignored as intended
  • The summary table now shows ignored-failure modules as "Ignored" (yellow) instead of "Passed" (green)
  • The header line now shows an "ignored" count (e.g., 6 passed | 1 ignored) instead of counting them as passed

Repro: https://github.com/thomhurst/AsyncSemaphore/actions/runs/21785317440/job/62855734047

Root Cause

When ModuleExecutionPipeline handled an ignored failure, it set executionContext.Status = Status.IgnoredFailure and returned a result without re-throwing. This caused two bugs:

  1. ModuleRunner.ExecuteCore called MarkModuleCompleted(moduleType, true) unconditionally (no exception = success), so ModuleStateTracker recorded Status.Successful in the timeline → table showed "Passed"
  2. PipelineSummary.GetStatus() checked only ModuleResultType.Failure without considering ModuleStatus == IgnoredFailure → pipeline reported as Failed

Changes

File Change
PipelineSummary.cs GetStatus() excludes IgnoredFailure results from pipeline failure
IModuleStateTracker.cs Added Status? statusOverride parameter to MarkModuleCompleted
IModuleScheduler.cs Same interface update
ModuleScheduler.cs Passes statusOverride through
ModuleStateTracker.cs Uses statusOverride when provided instead of computing from the success bool
ModuleRunner.cs Passes moduleState.Result?.ModuleStatus as override; fixes activity tracing for ignored failures
MetricsCollector.cs WasSuccessful derived from actual status; ignored failures excluded from passed/failed counts
SpectreResultsPrinter.cs Header shows "ignored" count

Test plan

  • Pipeline with a module using IgnoreFailuresCondition where the module fails should complete successfully
  • Summary table should show the module as "Ignored" (yellow) not "Passed" (green)
  • Header should show N passed | 1 ignored instead of N+1 passed
  • Pipeline with a real (non-ignored) failure should still fail as expected
  • Dependent modules should still execute when an upstream module has an ignored failure

🤖 Generated with Claude Code

…ing as Passed

Modules configured with IgnoreFailuresCondition were causing two bugs:
1. The pipeline reported as Failed despite the failure being configured to be ignored
2. The summary table showed the module as "Passed" instead of "Ignored"

Root cause: When ModuleExecutionPipeline handled an ignored failure, it returned
a result without re-throwing, so ModuleRunner called MarkModuleCompleted with
success=true. This caused ModuleStateTracker to record Status.Successful. Meanwhile,
PipelineSummary.GetStatus() checked only ModuleResultType.Failure without considering
that the failure was ignored.

Fix: Pass the actual module status through to the state tracker via a statusOverride
parameter, and exclude IgnoredFailure results from pipeline failure determination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
An ignored failure still executed — it shouldn't be recorded as skipped.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

This branch was previously deployed

1 inactive deployment
Pull Requests — 49758e09 Deployed Feb 7, 2026 by thomhurst via pipeline (windows-latest) #8212
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant